package com.example.exceldemo.liteflowComponent.common;

import com.example.exceldemo.model.DemoContext;
import com.example.exceldemo.model.ReqInfoDTO;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * @author yangwb8
 * @Date 2025/5/17 03:36
 */
@LiteflowComponent("start")
@Slf4j
public class DocumentsInfo extends NodeComponent {
    @Override
    public void process() throws Exception {
        System.out.println("生成文档");
        DemoContext context = this.getContextBean(DemoContext.class);
        List<ReqInfoDTO> reqInfoDTOS = context.getReqInfoDTOS();
        // 记录日志，标记本次处理的需求数量
        log.info("--------------------本次分析需求数为：-----------------{}", reqInfoDTOS.size());
    }
}
